const state = {
    mapid: '',
    points: [], // 设备列表
    gis: '',
}

const mutations = {
    MAP_SETTING: (state, { key, val }) => {
        if (state.hasOwnProperty(key)) {
            state[key] = val
        }
    },
    SET_POINTS: (state, list) => {
        state.points = list
    }
}

const actions = {
    mapSetting({ commit }, data) {
        commit('MAP_SETTING', data)
    },
    setPoints({ commit }, list) {
        commit('SET_POINTS', list)
    }
}

export default {
    namespaced: true,
    state,
    mutations,
    actions
}